<? $this->headTitle('Users'); ?>
<? $this->placeholder('title')->set('Users'); ?>

<p>
    <a href="<?php echo $this->url(array('controller'=>'user', 'action'=>'add')); ?>">Add New User</a>
</p>
<table class="t1">
    <tr>
        <th>Name</th>
        <th>Login</th>
        <th>Groups</th>
        <th>&nbsp;</th>
    </tr>
    <?php foreach($this->users as $user): ?>
    <tr>
        <td><?php echo $this->escape($user['name']); ?></td>
        <td><?php echo $this->escape($user['login']); ?></td>
        <td>
            <?php foreach($user['groups'] as $group) echo $group['name'].'<br/>'; ?>
        </td>
        <td>
            <a href="<?php echo $this->url(array('controller'=>'user', 'action'=>'edit', 'id'=>$user['id'])); ?>">Edit</a>
            <a href="<?php echo $this->url(array('controller'=>'user', 'action'=>'delete', 'id'=>$user['id'])); ?>">Delete</a>
        </td>
    </tr>
    <?php endforeach; ?>
</table>